<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {switch name="name"}
        {case value="distribution"}
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('是否开启分销')}:</label>
                <div class="col-xs-12 col-sm-8">
                    {:Form::switcher('row[distribution_status]', $row.distribution_status ?? 1, ['color'=>'success'])}
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('分销层级')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-distribution_level" data-rule="integer,range(0~3)" class="form-control" name="row[distribution_level]" data-msg-range="最大三级分销" type="number" value="{$row.distribution_level ?? '3'}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('一级返佣比例')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input aria-describedby="c-distribution_one_rate" data-rule="integer,range(0~100)" class="form-control" name="row[distribution_one_rate]" type="text" value="{$row.distribution_one_rate ?? '0'}">
                        <span class="input-group-addon" id="c-distribution_one_rate">%</span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('二级返佣比例')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input aria-describedby="c-distribution_two_rate"  data-rule="integer,range(0~100)" class="form-control" name="row[distribution_two_rate]" type="text" value="{$row.distribution_two_rate ?? '0'}">
                        <span class="input-group-addon" id="c-distribution_two_rate">%</span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('三级返佣比例')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input aria-describedby="c-distribution_three_rate"  data-rule="integer,range(0~100)" class="form-control" name="row[distribution_three_rate]" type="text" value="{$row.distribution_three_rate ?? '0'}">
                        <span class="input-group-addon" id="c-distribution_three_rate">%</span>
                    </div>
                </div>
            </div>
        {/case}
        {case value="apply"}
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('是否开启提现')}:</label>
                <div class="col-xs-12 col-sm-8">
                    {:Form::switcher('row[apply_status]', $row.apply_status ?? '1', ['color'=>'success'])}
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('手续费')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <div class="input-group">
                        <input aria-describedby="c-apply_rate" data-rule="integer,range(0~1000)" class="form-control" name="row[apply_rate]" min="0" type="number" value="{$row.apply_rate ?? '0'}">
                        <span class="input-group-addon" id="c-apply_rate">‰</span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('最低提现金额')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-apply_small_money" class="form-control" data-rule="integer,range(1~)" name="row[apply_small_money]" min="1" type="number" value="{$row.apply_small_money ?? '1'}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('最高提现金额')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-apply_large_money" class="form-control" data-rule="integer,range(1~)" name="row[apply_large_money]" min="1" type="number" value="{$row.apply_large_money ?? '1'}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('每日提现次数')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-apply_daily_num" class="form-control" data-rule="integer,range(1~)" name="row[apply_daily_num]" min="1" type="number" value="{$row.apply_daily_num ?? '1'}">
                </div>
            </div>
        {/case}
        {case value="share"}
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('分享标题')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-share_title" class="form-control" name="row[share_title]" type="text" value="{$row.share_title ?? ''}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('分享图片')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input id="c-share_image" data-rule="" class="form-control" size="50" name="row[share_image]" type="text" value="{$row.share_image ?? ''}">
                        <div class="input-group-addon no-border no-padding">
                            <span><button type="button" id="faupload-share_image" class="btn btn-danger faupload" data-input-id="c-share_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-share_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                            <span><button type="button" id="fachoose-share_image" class="btn btn-primary fachoose" data-input-id="c-share_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                        </div>
                        <span class="msg-box n-right" for="c-share_image"></span>
                    </div>
                    <ul class="row list-inline faupload-preview" id="p-share_image"></ul>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('分享描述')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-share_description" class="form-control" name="row[share_description]" type="text" value="{$row.share_description ?? ''}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('海报文案')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <textarea id="c-poster_text" class="form-control" name="row[poster_text]" rows="5">{$row.poster_text ?? ''}</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('海报背景图')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input id="c-poster_image" data-rule="" class="form-control" size="50" name="row[poster_image]" type="text" value="{$row.poster_image ?? ''}">
                        <div class="input-group-addon no-border no-padding">
                            <span><button type="button" id="faupload-poster_image" class="btn btn-danger faupload" data-input-id="c-poster_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-poster_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                            <span><button type="button" id="fachoose-poster_image" class="btn btn-primary fachoose" data-input-id="c-poster_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                        </div>
                        <span class="msg-box n-right" for="c-poster_image"></span>
                    </div>
                    <ul class="row list-inline faupload-preview" id="p-poster_image"></ul>
                </div>
            </div>
        {/case}

        {case value="shopinfo"}
<!--            <div class="row">-->
<!--                <div class="col-md-12">-->
<!--                    <div class="panel panel-default">-->
<!--                        <div class="panel-heading">商品配置</div>-->
<!--                        <div class="panel-body">-->

<!--                            <div class="form-group">-->
<!--                                <label class="control-label col-xs-12 col-sm-2">{:__('库存预警阈值')}:</label>-->
<!--                                <div class="col-xs-12 col-sm-8">-->
<!--                                    <input id="c-stock_early_warning" data-rule="required" class="form-control" name="row[stock_early_warning]" min="0" type="number" value="{$row.stock_early_warning ?? 0}">-->
<!--                                </div>-->
<!--                            </div>-->
<!--                            <div class="form-group">-->
<!--                                <label class="control-label col-xs-12 col-sm-2">{:__('运费设置')}:</label>-->
<!--                                <div class="col-xs-12 col-sm-8">-->
<!--                                    <input id="c-stock_early_warning" data-rule="required" class="form-control" name="row[stock_early_warning]" min="0" type="number" value="{$row.stock_early_warning ?? 0}">-->
<!--                                </div>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->

<!--            <div class="row">-->
<!--                <div class="col-md-12">-->
<!--                    <div class="panel panel-default">-->
<!--                        <div class="panel-heading">基础配置</div>-->
<!--                        <div class="panel-body">-->
<!--                            <div class="form-group">-->
<!--                                <label class="control-label col-xs-12 col-sm-2">{:__('运费计算')}:</label>-->
<!--                                <div class="col-xs-12 col-sm-8">-->
<!--                                    <div class="radio">-->
<!--                                        {foreach name="freightTypeList" item="vo"}-->
<!--                                        <label for="row[freight_type]-{$key}"><input id="row[freight_type]-{$key}" name="row[freight_type]" type="radio" value="{$key}" {in name="key" value="$row.freight_type ?? 1"}checked{/in} /> {$vo}</label>-->
<!--                                        {/foreach}-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                            </div>-->
<!--                            <div class="form-group">-->
<!--                                <label class="control-label col-xs-12 col-sm-2">{:__('退货地址')}:</label>-->
<!--                                <div class="col-xs-12 col-sm-8">-->
<!--                                    <input id="c-aftersale_address" data-rule="required" class="form-control" name="row[aftersale_address]" type="text" value="{$row.aftersale_address ?? ''}">-->
<!--                                </div>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->

<!--            <div class="row">-->
<!--                <div class="col-md-12">-->
<!--                    <div class="panel panel-default">-->
<!--                        <div class="panel-heading">订单配置</div>-->
<!--                        <div class="panel-body">-->

<!--                            <div class="form-group">-->
<!--                                <label class="control-label col-xs-12 col-sm-2">{:__('自动关闭时间')}:</label>-->
<!--                                <div class="col-xs-12 col-sm-8">-->
<!--                                    <div class="input-group">-->
<!--                                        <input aria-describedby="c-auto_close_minutes" class="form-control" name="row[auto_close_minutes]" min="0" type="number" value="{$row.auto_close_minutes ?? 0}">-->
<!--                                        <span class="input-group-addon" id="c-auto_close_minutes">分钟</span>-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                            </div>-->
<!--                            <div class="form-group">-->
<!--                                <label class="control-label col-xs-12 col-sm-2">{:__('自动收货时间')}:</label>-->
<!--                                <div class="col-xs-12 col-sm-8">-->
<!--                                    <div class="input-group">-->
<!--                                        <input aria-describedby="c-auto_receipt_days" class="form-control" name="row[auto_receipt_days]" min="0" type="number" value="{$row.auto_receipt_days ?? 0}">-->
<!--                                        <span class="input-group-addon" id="c-auto_receipt_days">天</span>-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                            </div>-->
<!--                            <div class="form-group">-->
<!--                                <label class="control-label col-xs-12 col-sm-2">{:__('自动评价时间')}:</label>-->
<!--                                <div class="col-xs-12 col-sm-8">-->
<!--                                    <div class="input-group">-->
<!--                                        <input aria-describedby="c-auto_comment_days" class="form-control" name="row[auto_comment_days]" min="0" type="number" value="{$row.auto_comment_days ?? 0}">-->
<!--                                        <span class="input-group-addon" id="c-auto_comment_days">天</span>-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                            </div>-->

<!--                            <div class="form-group">-->
<!--                                <label class="control-label col-xs-12 col-sm-2">{:__('自动评价内容')}:</label>-->
<!--                                <div class="col-xs-12 col-sm-8">-->

<!--                                    <input id="c-auto_comment_content" class="form-control" name="row[auto_comment_content]" min="0" type="text" value="{$row.auto_comment_content ?? '用户默认好评~'}">-->
<!--                                </div>-->
<!--                            </div>-->
<!--                            <div class="form-group">-->
<!--                                <label class="control-label col-xs-12 col-sm-2">{:__('评价内容发布')}:</label>-->
<!--                                <div class="col-xs-12 col-sm-8">-->
<!--                                    {:Form::radios('row[comment_status]', ['0'=>'审核后发布', '1'=>'直接发布'], $row.comment_status ?? 0, ['data-rule'=>'required'])}-->
<!--                                </div>-->
<!--                            </div>-->

<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
            <div class="row">
                <div class="col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">基础配置</div>
                        <div class="panel-body">
                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2">{:__('Vip购买开启')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    {:Form::switcher('row[vip_status]', $row.vip_status ?? '1', ['color'=>'success'])}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2">{:__('公司LOGO')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <div class="input-group">
                                        <input id="c-logo" data-rule="" class="form-control" size="50" name="row[logo]" type="text" value="{$row.logo ?? ''}">
                                        <div class="input-group-addon no-border no-padding">
                                            <span><button type="button" id="faupload-logo" class="btn btn-danger faupload" data-input-id="c-logo" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-logo"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                            <span><button type="button" id="fachoose-logo" class="btn btn-primary fachoose" data-input-id="c-logo" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                        </div>
                                        <span class="msg-box n-right" for="c-logo"></span>
                                    </div>
                                    <ul class="row list-inline faupload-preview" id="p-logo"></ul>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">文章配置</div>
                        <div class="panel-body">

                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2">{:__('用户协议')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <div class="input-group">
                                        <input id="c-user_agreement" data-rule="required" class="form-control" name="row[user_agreement]" min="0" type="number" value="{$row.user_agreement ?? 0}">
                                        <div class="input-group-addon no-border no-padding">
                                            <span><button type="button" data-url="xiluedu/singlepage/selects" id="fachoose-user_agreement" class="btn btn-primary fachoose" data-input-id="c-user_agreement" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                        </div>
                                    </div>

                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2">{:__('隐私协议')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <div class="input-group">
                                        <input id="c-privacy_agreement" data-rule="required" class="form-control" name="row[privacy_agreement]" min="0" type="number" value="{$row.privacy_agreement ?? 0}">
                                        <div class="input-group-addon no-border no-padding">
                                            <span><button type="button" data-url="xiluedu/singlepage/selects" id="fachoose-privacy_agreement" class="btn btn-primary fachoose" data-input-id="c-privacy_agreement" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        {/case}
        {case value="user"}
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('默认昵称')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-nickname" class="form-control" name="row[nickname]" type="text" value="{$row.nickname ?? ''}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('默认头像')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input id="c-avatar" data-rule="" class="form-control" size="50" name="row[avatar]" type="text" value="{$row.avatar ?? ''}">
                        <div class="input-group-addon no-border no-padding">
                            <span><button type="button" id="faupload-avatar" class="btn btn-danger faupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                            <span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                        </div>
                        <span class="msg-box n-right" for="c-avatar"></span>
                    </div>
                    <ul class="row list-inline faupload-preview" id="p-avatar"></ul>
                </div>
            </div>
        {/case}
        {case value="minimessage"}
            <div class="row">
                <div class="col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">微信小程序订阅消息</div>
                        <div class="panel-body">
                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2">{:__('下单成功')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input id="c-mini_order_success_id" class="form-control" name="row[mini_order_success_id]" type="text" value="{$row.mini_order_success_id ?? ''}">

                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2">{:__('发货成功')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input id="c-mini_order_freight_id" class="form-control" name="row[mini_order_freight_id]" type="text" value="{$row.mini_order_freight_id ?? ''}">

                                </div>
                            </div>

                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2">{:__('邀请下级成功')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input id="c-mini_user_invitor_id" class="form-control" name="row[mini_user_invitor_id]" type="text" value="{$row.mini_user_invitor_id ?? ''}">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2">{:__('获得佣金')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input id="c-mini_user_commission_id" class="form-control" name="row[mini_user_commission_id]" type="text" value="{$row.mini_user_commission_id ?? ''}">
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        {/case}
        {case value="mobileconfig"}
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('客服二维码')}:</label>
            <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <input id="c-custom_qrcode" data-rule="" class="form-control" size="50" name="row[custom_qrcode]" type="text" value="{$row.custom_qrcode ?? ''}">
                    <div class="input-group-addon no-border no-padding">
                        <span><button type="button" id="faupload-custom_qrcode" class="btn btn-danger faupload" data-input-id="c-custom_qrcode" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-custom_qrcode"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                        <span><button type="button" id="fachoose-custom_qrcode" class="btn btn-primary fachoose" data-input-id="c-custom_qrcode" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                    </div>
                    <span class="msg-box n-right" for="c-custom_qrcode"></span>
                </div>
                <ul class="row list-inline faupload-preview" id="p-custom_qrcode"></ul>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('客服设置')}:</label>
            <div class="col-xs-12 col-sm-8">
                <table class="table fieldlist" data-template="basictpl" data-name="row[customers]" id="first-table">
                    <tr>
                        <td>{:__('客服名称')}</td>
                        <td>{:__('手机号')}</td>
                        <td>{:__('邮箱')}</td>
                        <td width="100"></td>
                    </tr>
                    <tr>
                        <td colspan="5"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></td>
                    </tr>
                </table>

                <!--请注意实际开发中textarea应该添加个hidden进行隐藏-->
                {if condition="isset($row['customers'])"}
                <textarea name="row[customers]" class="form-control hide" cols="30" rows="5">{$row['customers']}</textarea>
                {else /}
                <textarea name="row[customers]" class="form-control hide" cols="30" rows="5"></textarea>
                {/if}
                <script id="basictpl" type="text/html">
                    <tr class="form-inline">
                        <td><input type="text" name="<%=name%>[<%=index%>][name]" class="form-control" size="15" value="<%=row.name%>" placeholder="名称"/></td>
                        <td><input type="text" name="<%=name%>[<%=index%>][mobile]" class="form-control" size="15" value="<%=row.mobile%>" placeholder="手机"/></td>
                        <td><input type="email" name="<%=name%>[<%=index%>][email]" class="form-control" size="15" value="<%=row.email%>" placeholder="邮箱"/></td>
                        <!--                    <td>-->
                        <!--                        <input type="hidden" name="<%=name%>[<%=index%>][state]" id="c-state-<%=index%>" class="form-control" style="width:50px" value="<%=row.state%>" placeholder="状态"/>-->
                        <!--                        <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-state-<%=index%>" data-yes="1" data-no="0" >-->
                        <!--                            <i class="fa fa-toggle-on text-success <%if(row.state==0){%>fa-flip-horizontal text-gray<%}%> fa-2x"></i>-->
                        <!--                        </a>-->
                        <!--                    </td>-->
                        <td>
                            <!--下面的两个按钮务必保留-->
                            <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
<!--                            <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>-->
                        </td>
                    </tr>
                </script>
            </div>
        </div>
        {/case}
        {case value="wxpublic"}
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('公众号名称')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-wxpublic_name" class="form-control" name="row[wxpublic_name]" type="text" value="{$row.wxpublic_name ?? ''}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('公众号头像')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input id="c-wxpublic_avatar" data-rule="" class="form-control" size="50" name="row[wxpublic_avatar]" type="text" value="{$row.wxpublic_avatar ?? ''}">
                        <div class="input-group-addon no-border no-padding">
                            <span><button type="button" id="faupload-wxpublic_avatar" class="btn btn-danger faupload" data-input-id="c-wxpublic_avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-wxpublic_avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                            <span><button type="button" id="fachoose-wxpublic_avatar" class="btn btn-primary fachoose" data-input-id="c-wxpublic_avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                        </div>
                        <span class="msg-box n-right" for="c-wxpublic_avatar"></span>
                    </div>
                    <ul class="row list-inline faupload-preview" id="p-wxpublic_avatar"></ul>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('公众号二维码')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input id="c-wxpublic_code" data-rule="" class="form-control" size="50" name="row[wxpublic_code]" type="text" value="{$row.wxpublic_code ?? ''}">
                        <div class="input-group-addon no-border no-padding">
                            <span><button type="button" id="faupload-wxpublic_code" class="btn btn-danger faupload" data-input-id="c-wxpublic_code" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-wxpublic_code"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                            <span><button type="button" id="fachoose-wxpublic_code" class="btn btn-primary fachoose" data-input-id="c-wxpublic_code" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                        </div>
                        <span class="msg-box n-right" for="c-wxpublic_code"></span>
                    </div>
                    <ul class="row list-inline faupload-preview" id="p-wxpublic_code"></ul>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('APPID')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-wxpublic_appid" class="form-control" name="row[wxpublic_appid]" type="text" value="{$row.wxpublic_appid ?? ''}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('APPSECRET')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-wxpublic_secret" class="form-control" name="row[wxpublic_secret]" type="text" value="{$row.wxpublic_secret ?? ''}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('网页授权回调地址')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-wxpublic_site" class="form-control" name="row[wxpublic_site]" type="text" value="{$row.wxpublic_site ?? ''}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('令牌(Token)')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-wxpublic_token" class="form-control" name="row[wxpublic_token]" type="text" value="{$row.wxpublic_token ?? ''}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('消息加解密密钥')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-wxpublic_encryption_key" class="form-control" name="row[wxpublic_encryption_key]" type="text" value="{$row.wxpublic_encryption_key ?? ''}">
                </div>
            </div>
        {/case}
        {case value="wxmini"}
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('小程序名称')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-wxmini_name" class="form-control" name="row[wxmini_name]" type="text" value="{$row.wxmini_name ?? ''}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('小程序头像')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input id="c-wxmini_avatar" data-rule="" class="form-control" size="50" name="row[wxmini_avatar]" type="text" value="{$row.wxmini_avatar ?? ''}">
                        <div class="input-group-addon no-border no-padding">
                            <span><button type="button" id="faupload-wxmini_avatar" class="btn btn-danger faupload" data-input-id="c-wxmini_avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-wxmini_avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                            <span><button type="button" id="fachoose-wxmini_avatar" class="btn btn-primary fachoose" data-input-id="c-wxmini_avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                        </div>
                        <span class="msg-box n-right" for="c-wxmini_avatar"></span>
                    </div>
                    <ul class="row list-inline faupload-preview" id="p-wxmini_avatar"></ul>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('小程序二维码')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input id="c-wxmini_code" data-rule="" class="form-control" size="50" name="row[wxmini_code]" type="text" value="{$row.wxmini_code ?? ''}">
                        <div class="input-group-addon no-border no-padding">
                            <span><button type="button" id="faupload-wxmini_code" class="btn btn-danger faupload" data-input-id="c-wxmini_code" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-wxmini_code"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                            <span><button type="button" id="fachoose-wxmini_code" class="btn btn-primary fachoose" data-input-id="c-wxmini_code" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                        </div>
                        <span class="msg-box n-right" for="c-wxmini_code"></span>
                    </div>
                    <ul class="row list-inline faupload-preview" id="p-wxmini_code"></ul>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('APPID')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-wxmini_appid" class="form-control" name="row[wxmini_appid]" type="text" value="{$row.wxmini_appid ?? ''}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('APPSECRET')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-wxmini_secret" class="form-control" name="row[wxmini_secret]" type="text" value="{$row.wxmini_secret ?? ''}">
                </div>
            </div>
        {/case}
        {case value="wxopen"}
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('APPID')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-wxopen_appid" class="form-control" name="row[wxopen_appid]" type="text" value="{$row.wxopen_appid ?? ''}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('APPSECRET')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-wxopen_secret" class="form-control" name="row[wxopen_secret]" type="text" value="{$row.wxopen_secret ?? ''}">
                </div>
            </div>
        {/case}
        {case value="wxpayment"}
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('商户号')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-mch_id" class="form-control" name="row[mch_id]" type="text" value="{$row.mch_id ?? ''}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('支付密钥')}:</label>
                <div class="col-xs-12 col-sm-8">

                    <input id="c-mch_key" class="form-control" name="row[mch_key]" type="text" value="{$row.mch_key ?? ''}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('商户证书')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input id="c-apiclient_cert" data-rule="" class="form-control" name="row[apiclient_cert]" type="text" value="{$row.apiclient_cert ?? ''}">
                        <div class="input-group-addon no-border no-padding">
                            <span><button type="button" id="faupload-apiclient_cert" class="btn btn-danger faupload" data-input-id="c-apiclient_cert" data-multiple="false" data-preview-id="p-apiclient_cert"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                        </div>
                        <span class="msg-box n-right" for="c-apiclient_cert"></span>
                    </div>
                    <ul class="row list-inline faupload-preview" id="p-apiclient_cert"></ul>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('商户key证书')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input id="c-apiclient_key" data-rule="" class="form-control" name="row[apiclient_key]" type="text" value="{$row.apiclient_key ?? ''}">
                        <div class="input-group-addon no-border no-padding">
                            <span><button type="button" id="faupload-apiclient_key" class="btn btn-danger faupload" data-input-id="c-apiclient_key" data-multiple="false" data-preview-id="p-apiclient_key"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                        </div>
                        <span class="msg-box n-right" for="c-apiclient_key"></span>
                    </div>
                    <ul class="row list-inline faupload-preview" id="p-apiclient_key"></ul>
                </div>
            </div>
        {/case}
    {/switch}
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>